<?php

require_once dirname(__FILE__).'/../class/functions.php';
require_once dirname(__FILE__).'/../class/user.class.php';

$a = session_id();if(empty($a)) session_start();

$logat = is_logat();

if($logat == 0)
    die("Nu v-ati logat");
else
{
    if( $_SESSION['logat'] == "admin" )
    {
        //echo "sunteti admin";     
        $user=unserialize($_SESSION['userc']);
        //echo list_rez();
        //$admin=1;
        $adm=1;
    }
    else die("Interzis utilizatorilor normali!(Nu aveti drepturi!)");
    
}

?>


<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="icon" href="favicon.jpg" type="image/gif" sizes="16x16" /> 
        <link rel="stylesheet" type="text/css" href="../style/style.css" />
        <title>Panou Administriv</title>
    </head>
<body>
  <? 
      what_header();
      footer();
        ?>
        <div id="content">
            <div id="content_inside">
                    <div id="content_inside_sidebar">
                        <ul>
                            <li><a href ="../index.php"> Home</a><br /></li>
                            <li><a href ="admin.php"> Panou Principal</a><br /></li>
                            <li><a href ="p_news.php"> Noutati</a><br /></li>  
                            <li><a href ="p_rezervari.php"> Rezervari</a><br /></li>
                            <li><a href ="p_downloads.php"> Downloads</a><br /></li>                   
                                           
                         </ul>
                                 
                    </div>
            <div id="content_inside_main">
                                        
                                
                <div id="rezervari_stuff" style="display: block">
                   <?
                            $search="<div id='search_rez'>";
                            $perioade=  pt_rezervari("perioade", "perioada");
                            $sali=  pt_rezervari("sali", "sala");
                            $categorii= pt_rezervari("categorii", "categoria");
                            $anii=pt_rezervari("ani", "an");
                            $search.="</div>";
                                             
                   ?>
                    <form  method=post>
                    <?
                    echo $perioade;
                    echo $sali;
                    
                    ?>
                    Motiv: <input type="text" name="motiv" value=""/> 
                    Data: <input type="text"  id="datepicker" name="data" value=""/> <br/>
                    <a href="#" class="grey-button pcb"><span id="rez_submit">Submit</span></a> <br/> <br/>
                         </form>
                    <form>
                    <input type="radio" name="mod" class="sel_mod2" value="0" /> Cautare<br />
                    <input type="radio" name="mod" class="sel_mod2" value="1" /> Adaugare<br />
                    </form>  
                     <hr /><br />
                     <div id="rez_se_res">
                                           
                         <div>      <?php  echo list_rez($adm); ?>             </div>
                      </div>

                 </div>
                
            </div>
            </div>
            
        </div>
<? footer(1); ?>
</body>


</html>